package com.cyl.manager.vip.domain.entity;

import java.math.BigDecimal;
import java.time.LocalDateTime;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.ruoyi.common.core.domain.BaseAudit;
import lombok.Data;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;

/**
 * VIP订单表对象 vip_order
 *
 * @author system
 */
@ApiModel(description="VIP订单表对象")
@Data
@TableName("vip_order")
public class VipOrder extends BaseAudit {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty("订单ID")
    @TableId(type = IdType.AUTO)
    private Long id;

    @ApiModelProperty("订单号")
    @Excel(name = "订单号")
    private String orderSn;

    @ApiModelProperty("用户ID")
    @Excel(name = "用户ID")
    private Long userId;

    @ApiModelProperty("VIP配置ID")
    @Excel(name = "VIP配置ID")
    private Long rechargeDataId;

    @ApiModelProperty("VIP天数")
    @Excel(name = "VIP天数")
    private Integer vipDays;

    @ApiModelProperty("订单金额")
    @Excel(name = "订单金额")
    private BigDecimal amount;

    @ApiModelProperty("实付金额")
    @Excel(name = "实付金额")
    private BigDecimal payAmount;

    @ApiModelProperty("支付方式（1：支付宝，2：微信）")
    @Excel(name = "支付方式", readConverterExp = "1=支付宝,2=微信")
    private Integer payType;

    @ApiModelProperty("订单状态（0：待支付，1：已支付，2：已取消，3：已退款）")
    @Excel(name = "订单状态", readConverterExp = "0=待支付,1=已支付,2=已取消,3=已退款")
    private Integer status;

    @ApiModelProperty("支付时间")
    @Excel(name = "支付时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime payTime;

    @ApiModelProperty("第三方支付订单号")
    @Excel(name = "第三方支付订单号")
    private String thirdPartyOrderSn;

    @ApiModelProperty("备注")
    @Excel(name = "备注")
    private String remark;

    @ApiModelProperty("是否自动续费（0：否，1：是）")
    @Excel(name = "是否自动续费", readConverterExp = "0=否,1=是")
    private Boolean isAutoRenew;

    @ApiModelProperty("删除标志（0代表存在 2代表删除）")
    private String delFlag;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

}
